package com.starlink.model.util;

import com.starlink.model.dtomapper.MallLogisticsDtoMapper;
import com.starlink.model.domain.MallLogisticsDO;
import com.starlink.model.vo.MallLogisticsVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallLogisticsConvert {

    public static List<MallLogisticsVO> buildMallLogisticsVoList(List<MallLogisticsDO> mallLogisticsDOList) {
        if (CollectionUtils.isEmpty(mallLogisticsDOList)) {
            return Lists.newArrayList();
        }
        List<MallLogisticsVO> mallLogisticsVOList = new ArrayList<>();
        for (MallLogisticsDO mallLogisticsDO : mallLogisticsDOList) {
            mallLogisticsVOList.add(MallLogisticsDtoMapper.INSTANCE.do2VO(mallLogisticsDO));
        }

        return mallLogisticsVOList;
    }
}
